package com.ly.lypopupwindowdemo.activity;

import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.ly.lypopupwindowdemo.R;
import com.ly.lypopupwindowdemo.views.AutoNumber;

public class NumberDanceActivity extends AppCompatActivity {

    private AutoNumber numText;
    private EditText edit;
    private Button btn01;
    Handler handler;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_number_dance);

        numText = (AutoNumber) findViewById(R.id.num);
        edit = (EditText) findViewById(R.id.editText);
        btn01 = (Button) findViewById(R.id.btn01);
        handler = new Handler();

        btn01.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                numText.setText(edit.getText().toString(),
                        TextView.BufferType.NORMAL, handler);

            }
        });
    }
}
